package com.authine.cloudpivot.ext.dto.model.settle;

import com.authine.cloudpivot.ext.Enum.SettleApplyType;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 结算申请明细(基于已开发票)
 *
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Schema(description = "结算申请发票明细")
public class SettleInvoiceDetail implements Serializable {

    private static final long serialVersionUID = 2697892433605086721L;

    /**
     * 对应维度勾选申请结算的ID
     */
    @Schema(description = "勾选要申请的类型ID，用于页面展示")
    private String apply_id;

    @Schema(description = "申请的结算类型")
    private SettleApplyType apply_type;
    /**
     * 发票申请单ID
     */
    @Schema(description = "发票申请单ID", required = true)
    private String invoice_apply_id;

    /**
     * 账单ID
     */
    @Schema(description = "账单ID", hidden = true)
    private String bill_id;

    /**
     * 发票明细核销账单ID
     */
    @Schema(description = "发票明细核销账单ID")
    private String invoice_detail_bill_id;
    /**
     * 交易ID
     */
    @Schema(description = "交易ID", hidden = true)
    private String trade_id;

    /**
     * 票面 确认开票日期
     */
    @Schema(description = "票面 开票日期")
    private Date date;

    /**
     * 单张发票账单金额（已开票含税金额）
     */
    @Schema(description = "发票金额")
    private BigDecimal total;
    /**
     * 可申请核销金额(已排除已申请结算金额)
     */
    @Schema(description = "可申请金额")
    private BigDecimal write_off_amount;
    /**
     * 本次申请金额(输入框填写的金额)
     */
    @Schema(description = "本次申请金额")
    private BigDecimal batch_total;
    /**
     * 账单维度已开票金额(包含其他发票上面账单的金额)
     */
    @Schema(description = "账单维度已开票金额", hidden = true)
    private BigDecimal bill_total;
    /**
     * 平台费率
     */
    @Schema(description = "平台费率")
    private BigDecimal platform_rate;
    /**
     * 平台费
     */
    @Schema(description = "平台费")
    private BigDecimal platformservicefee;
    /**
     * 金融费率
     */
    @Schema(description = "金融费率")
    private BigDecimal interest_rate;
    /**
     * 金融费
     */
    @Schema(description = "金融费")
    private BigDecimal interests;
    /**
     * 品名
     */
    @Schema(description = "品名", hidden = true)
    private String name;
    /**
     * 型号和规格
     */
    @Schema(description = "型号和规格", hidden = true)
    private String model_spec;
    /**
     * 发票号码
     */
    @Schema(description = "发票号码", hidden = true)
    private String number;


    /**
     * 发票抬头（核销时凭证用）
     */
    @Schema(description = "发票抬头（核销时凭证用）")
    private String invoice_purchase_name;

    /**
     * 发票已核销金额
     */
    @Schema(description = "发票抬头已核销金额")
    private BigDecimal written_off_amount;

    /**
     * 客户结款状态
     */
    @Schema(description = "客户结款状态")
    private boolean settleCustomerStatus;
}
